import Vue from 'vue'
import Router from 'vue-router'
import OrCommon from '@/common/OrCommon'                                          // 订单公共

const OrProduct = () => import('@/views/OrProduct')                               // 产品管理
const OrSpecifications = () => import('@/views/OrSpecifications')                 // 规格管理
const OrClassification = () => import('@/views/OrClassification')                 // 分类管理
const OrBrand = () => import('@/views/OrBrand')                                   // 品牌管理
const OrModel = () => import('@/views/OrModel')                                   // 型号管理
const OrderList = () => import('@/views/OrderList')                               // 订单列表

Vue.use(Router)

const routes = new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'OrCommon',
      component: OrCommon,
      redirect: '/orProduct',
      children: [
        {
          path: 'orProduct',
          name: 'orProduct',
          component: OrProduct,
        }, {
          path: 'OrSpecifications',
          name: 'OrSpecifications',
          component: OrSpecifications,
        }, {
          path: 'OrClassification',
          name: 'OrClassification',
          component: OrClassification
        }, {
          path: 'OrBrand',
          name: 'OrBrand',
          component: OrBrand
        },{
          path:'OrModel',
          name: 'OrModel',
          component: OrModel
        },{
          path: 'OrderList',
          name: 'OrderList',
          component: OrderList
        }
      ]
    }
  ]
})

export default routes
